package com.airnewslinkosky.ticket.util;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import android.content.Context;
import android.util.Log;

import com.airnewslinkosky.ticket.R;

public class FlyUtil {
	
	public static Map<String, String> flycommap = new HashMap<String, String>();
	
	/*订单状态*/
	public static Map<String, String> orderStatusMap = new HashMap<String, String>();
	
	/*客户支付类型*/
	public static Map<String, String> payTypeMap = new HashMap<String, String>();
	
	/*客户支付状态*/
	public static Map<String, String> payStatusMap = new HashMap<String, String>();
	
	/*
	 * Map<航空公司两字码,应用名称>
	 */
	public static Map<String,String> orgIdMap = new HashMap<String,String>();
	
	
	/*
	 * Map<三字码,航空公司>
	 */
	public static Map<String,String> airComMap = new HashMap<String,String>();
	
	/*
	 * Map<三字码,城市>
	 */
	public static Map<String,String> cityMap = new HashMap<String,String>();
	
	
	/*
	 * 值机情况
	 * Map<value, label>
	 */
	public static Map<String,String> checkinStatusMap = new HashMap<String,String>();
	
	
	/*银行名称*/
	public static String[] bankNames = new String[] { "建设银行", "民生银行", "兴业银行", "广发银行", "工商银行", 
													  "上海银行", "招商银行", "浦发银行", "中国银行" };
	
	/*银行编码*/
	public static String[] bankCodes = new String[] { "CCB", "CMBC", "CIB", "GDB", "ICBC", "BOSH", "CMB", "SPDB", "BOC" };
	
	/*航程类型*/
	public static String[] tripTypeCodes = new String[] {"单程","往返","联程"};
	
	/*是否要行程单*/
	public static String[] itineraryTypeCodes = new String[] {"不要行程单","机场代打","邮寄行程单"};
	
	/*乘客类型	*/
	public static String[] passengerTypeCodes = new String[] {"成人","儿童"};
	
	/*商户状态	*/
	public static String[] OfficeStateCodes = new String[] {"禁用","待审核","正常"};
	/**
	 * 根据选中的下拉列表位置取对应的银行编码
	 * @param position
	 * @return
	 */
	public static String getBankCode(int position){
		return bankCodes[position];
	}
	
	public static String getTripTypeCode(int position){
		return tripTypeCodes[position];
	}
	
	public static String getItineraryTypeCode(int position){
		return itineraryTypeCodes[position];
	}
	
	public static String getPassengerTypeCode(int position){
		return passengerTypeCodes[position];
	}
	
	public static String getOfficeStateCodes(int position){
		return OfficeStateCodes[position];
	}
	
	public FlyUtil(Context context) {

	}
	
	
	/**
	 * 获取接下来的多年的列表
	 * @param offSetYeas
	 * @return
	 */
	public static ArrayList<String> getYears(int offSetYeas){
		ArrayList<String> years = new ArrayList<String>();
		Calendar cale = Calendar.getInstance();
		int currYear = cale.get(Calendar.YEAR);
		for(int i = currYear; i <= currYear+offSetYeas; i++ ){
			years.add((""+i).substring(2, 4));
		}
		return years;
	}
	
	/**
	 * 根据城市名得到三字码
	 * @param label
	 * @return
	 */
	public static String getCityKey(String label){
		for(Iterator<String> it = cityMap.keySet().iterator(); it.hasNext(); ){
			String key = it.next();
			if(cityMap.get(key).equals(label)){
				return key;
			}
		}
		return null;
	}
	
	
	/**
	 * 根据航空公司名得到两字码
	 * @param label
	 * @return
	 */
	public static String getAirlineKey(String label){
		for(Iterator<String> it = orgIdMap.keySet().iterator(); it.hasNext(); ){
			String key = it.next();
			if(orgIdMap.get(key).equals(label)){
				return key;
			}
		}
		return null;
	}
	

	public String getName(String key) {
		return flycommap.get(key);
	}

	public static String getSimpleName(String key) {
		if (key.equals("东航")) {
			return "MU";
		} else if (key.equals("南航")) {
			return "CZ";
		} else if (key.equals("国航")) {
			return "CA";
		} else if (key.equals("海航")) {
			return "HU";
		}
		return "";
	}

	public static String getCardType(String key) {
		if (key.equals("身份证")) {
			return "0";
		} else if (key.equals("军人证")) {
			return "1";
		} else if (key.equals("护照")) {
			return "2";
		} else if (key.equals("回乡证")) {
			return "3";
		} else if (key.equals("港澳通行证")) {
			return "4";
		} else if (key.equals("台胞证")) {
			return "5";
		}  else if (key.equals("其他")) {
			return "6";
		}
		return "6";
	}
	
	public static String getCardTypeLabel(String value) {
		if ("0".equals(value)) {
			return "身份证";
		} else if ("1".equals(value)) {
			return "军人证";
		} else if ("2".equals(value)) {
			return "护照";
		} else if ("3".equals(value)) {
			return "回乡证";
		} else if ("4".equals(value)) {
			return "港澳通行证";
		} else if ("5".equals(value)) {
			return "台胞证";
		} else if ("6".equals(value)) {
			return "其他";
		}
		return "其他";
	}
	
	
	public static int getCardPosition(String str) {
		Log.i("getCardPosition str", str);
		if (str.equals("身份证")) {
			return 0;
		} else if (str.equals("军人证")) {
			return 1;
		} else if (str.equals("护照")) {
			return 2;
		}  else if (str.equals("回乡证")) {
			return 3;
		}  else if (str.equals("港澳通行证")) {
			return 4;
		}  else if (str.equals("台胞证")) {
			return 5;
		}  else if (str.equals("其他")) {
			return 6;
		}
		return 6;
	}
	
	public static String getCardLabel(int pos) {
		if (pos == 0) {
			return "身份证";
		} else if (pos == 1) {
			return "军人证";
		} else if (pos == 2) {
			return "护照";
		}  else if (pos == 3) {
			return "回乡证";
		}  else if (pos == 4) {
			return "港澳通行证";
		}  else if (pos == 5) {
			return "台胞证";
		}  else if (pos == 6) {
			return "其他";
		}
		return "其他";
	}

	public static String getJClassName(String key) {
		if (key.equals("F")) {
			return "头等舱";
		} else if (key.equals("C")) {
			return "公务舱";
		} else {
			return "经济舱";
		}
	}
	
	public static String getJClassCode(String name) {
		if (name.equals("头等舱")) {
			return "F";
		} else if (name.equals("公务舱")) {
			return "C";
		} else {
			return "Y";
		}
	}
	
	public String getOrderStatusNameByCode(String orderStatusCode) {
		String orderStatusName;
		if (orderStatusCode == null || orderStatusCode == "") {
			orderStatusName = "未知状态";
		} else if (orderStatusCode.length() == 1) {
			orderStatusName = orderStatusMap.get("0" + orderStatusCode);
		} else if(orderStatusCode.length() == 2) {
			orderStatusName = orderStatusMap.get(orderStatusCode);
		} else {
			orderStatusName = "未知状态";
		}
		return orderStatusName;
	}
	
	/**
	 * 根据航空公司得到其图标索引
	 * @param airline
	 * @return
	 */
	public static int getLogIndex(String airline){
		int index = 0;
		if("MU".equals(airline.toUpperCase())){//东航
			index = R.drawable.mu_log;
		}else if("CZ".equals(airline.toUpperCase())){//南航
			index = R.drawable.cz_log;
		}else if("CA".equals(airline.toUpperCase())){//中航
			index = R.drawable.ca_log;
		}else if("CN".equals(airline.toUpperCase())){//中航
			index = R.drawable.cn_log;
		}else if("HU".equals(airline.toUpperCase())){//海航
			index = R.drawable.hu_log;
		}else if("3U".equals(airline.toUpperCase())){
			index = R.drawable.three_u_log;
		}else if("8C".equals(airline.toUpperCase())){
			index = R.drawable.eight_c_log;
		}else if("8L".equals(airline.toUpperCase())){
			index = R.drawable.eight_l_log;
		}else if("EU".equals(airline.toUpperCase())){
			index = R.drawable.eu_log;
		}else if("FM".equals(airline.toUpperCase())){
			index = R.drawable.fm_log;
		}else if("HO".equals(airline.toUpperCase())){
			index = R.drawable.ho_log;
		}else if("KN".equals(airline.toUpperCase())){
			index = R.drawable.kn_log;
		}else if("MF".equals(airline.toUpperCase())){
			index = R.drawable.mf_log;
		}else if("MU".equals(airline.toUpperCase())){
			index = R.drawable.mu_log;
		}else if("PN".equals(airline.toUpperCase())){
			index = R.drawable.pn_log;
		}else if("SC".equals(airline.toUpperCase())){
			index = R.drawable.sc_log;
		}else if("ZH".equals(airline.toUpperCase())){
			index = R.drawable.zh_log;
		}else if("JR".equals(airline.toUpperCase())){
			index = R.drawable.jr_log;
		}else if("BK".equals(airline.toUpperCase())){
			index = R.drawable.bk_log;
		}else if("KY".equals(airline.toUpperCase())){
			index = R.drawable.ky_log;
		}
		return index;
	}
	
	/**
	 * 值机状态
	 * @param checkinStatus
	 * @return
	 */
	public static String getCheckinStatusLable(String checkinStatus){
		return "0".equals(checkinStatus) ? "可值机" : "不可值机";
	}
	
	
	

	public static void initCarrier() {
		if (flycommap.size() != 0) {
			return;
		}
		flycommap.put("MU", "东航");
		flycommap.put("CZ", "南航");
		flycommap.put("ZH", "深航");
		flycommap.put("PN", "西部");
		flycommap.put("3U", "川航");
		flycommap.put("FM", "上航");
		flycommap.put("CA", "国航");
		flycommap.put("HU", "海航");
		flycommap.put("MF", "厦航");
		flycommap.put("NS", "东北");
		flycommap.put("2Z", "长安");
		flycommap.put("CJ", "北部");
		flycommap.put("3W", "南京");
		flycommap.put("CI", "中华");
		flycommap.put("CX", "国泰");
		flycommap.put("WH", "西北");
		flycommap.put("X2", "新华");
		flycommap.put("XO", "新疆");
		flycommap.put("Z2", "中原");
		flycommap.put("3Q", "云南");
		flycommap.put("SC", "山东");
		flycommap.put("EU", "鹰联");
		flycommap.put("8C", "东星");
		flycommap.put("JD", "金鹿");
		flycommap.put("HO", "吉祥");
		flycommap.put("KN", "联合");
		flycommap.put("OQ", "重庆");
		flycommap.put("G5", "华夏");
		flycommap.put("BK", "奥凯");
		flycommap.put("VD", "鲲鹏");
		
		
//		flycommap.put("CA", "国航");
//		flycommap.put("SC", "山东");
//		flycommap.put("CZ", "南航");
//		flycommap.put("HU", "海航");
//		flycommap.put("MU", "东航");
//		flycommap.put("3U", "川航");
//		flycommap.put("FM", "上航");
//		flycommap.put("ZH", "深航");
//		flycommap.put("MF", "厦航");
//		flycommap.put("KN", "联合");
//		flycommap.put("JD", "金鹿");
//		flycommap.put("HO", "吉祥");

	}
	
//	flycommap.put("MU", "东方航空");
//	flycommap.put("CZ", "南方航空");
//	flycommap.put("ZH", "深圳航空");
//	flycommap.put("PN", "西部航空");
//	flycommap.put("3U", "四川航空");
//	flycommap.put("FM", "上海航空");
//	flycommap.put("CA", "国际航空");
//	flycommap.put("HU", "海南航空");
//	flycommap.put("MF", "厦门航空");
//	flycommap.put("NS", "东北航空");
//	flycommap.put("2Z", "长安航空");
//	flycommap.put("CJ", "北部航空");
//	flycommap.put("3W", "南京航空");
//	flycommap.put("CI", "中华航空");
//	flycommap.put("CX", "国泰航空");
//	flycommap.put("WH", "西北航空");
//	flycommap.put("X2", "新华航空");
//	flycommap.put("XO", "新疆航空");
//	flycommap.put("Z2", "中原航空");
//	flycommap.put("3Q", "云南航空");
//	flycommap.put("SC", "山东航空");
//	flycommap.put("EU", "鹰联航空");
//	flycommap.put("8C", "东星航空");
//	flycommap.put("JD", "金鹿航空");
//	flycommap.put("HO", "吉祥航空");
//	flycommap.put("KN", "联合航空");
//	flycommap.put("OQ", "重庆航空");
//	flycommap.put("G5", "华夏航空");
//	flycommap.put("BK", "奥凯航空");
//	flycommap.put("VD", "鲲鹏航空");
	
	public static String parseDiscount(String discount){
		if(discount!=null&&!"".equals(discount)){
			try{
					float f = Float.parseFloat(discount);
					if(f>=100f){
						return "全价";
					}
					String d = f/10+"";
					String[] arr = d.split("\\.");
					if("0".equals(arr[1])){
						return arr[0]+"折";
					}
					return d+"折";
				}catch (Exception e) {
				}
		}
		
		return discount;
	}
	
	
	static {
		initCarrier();
		orderStatusMap.put("0", "预订完成");
		orderStatusMap.put("100", "无效订单");
		orderStatusMap.put("101", "取消订单");
		orderStatusMap.put("200", "已订座，待支付");
		orderStatusMap.put("201", "已订座，待支付");
		orderStatusMap.put("202", "已订座，支付失败");
		orderStatusMap.put("203", "已支付，待出票");
		orderStatusMap.put("204", "出票失败");
		orderStatusMap.put("205", "出票完成，未取票号");
		orderStatusMap.put("206", "已出票");
		orderStatusMap.put("207", "已出票，未打印行程单");
		orderStatusMap.put("208", "已出票，已打印行程单");
		
		orderStatusMap.put("210", "申请全额退款");
		orderStatusMap.put("211", "全额退款失败");
		orderStatusMap.put("212", "全额退款成功");
		
		orderStatusMap.put("300", "申请退票");
		orderStatusMap.put("301", "申请退票失败");
		orderStatusMap.put("302", "退票处理中");
		orderStatusMap.put("303", "退票失败");
		orderStatusMap.put("304", "退票成功,未退款");
		orderStatusMap.put("305", "退票成功,已退款");
		
		orderStatusMap.put("310", "等待退款");
		orderStatusMap.put("311", "退款失败");
		orderStatusMap.put("312", "退款成功");
		
		orderStatusMap.put("400", "申请废票");
		orderStatusMap.put("401", "申请废票失败");
		orderStatusMap.put("402", "废票处理中");
		orderStatusMap.put("403", "废票失败");
		orderStatusMap.put("404", "废票成功");
		
		orderStatusMap.put("410", "等待退款");
		orderStatusMap.put("411", "退款失败");
		orderStatusMap.put("412", "退款成功");
		
		orderStatusMap.put("500", "申请修改证件");
		orderStatusMap.put("501", "修改证件处理中");
		orderStatusMap.put("502", "修改证件失败");
		orderStatusMap.put("503", "修改证件成功");
		
		orderStatusMap.put("600", "申请改签");
		orderStatusMap.put("601", "改签处理中");
		orderStatusMap.put("602", "改签失败");
		orderStatusMap.put("603", "改签成功");
		
		orderStatusMap.put("700", "申请改期");
		orderStatusMap.put("701", "申请改期失败");
		orderStatusMap.put("702", "申请改期处理中");
		orderStatusMap.put("703", "改期失败");
		orderStatusMap.put("704", "改期成功");
		
		//客户支付类型
		payTypeMap.put("0", "手机支付");
		payTypeMap.put("1", "电话支付");
		payTypeMap.put("2", "票到付款");
		
		//客户支付状态
		/*payStatusMap.put("0", "客户已支付");
		payStatusMap.put("1", "客户未支付");
		payStatusMap.put("3", "支付失败");
		payStatusMap.put("4", "已退款");
		payStatusMap.put("5", "未退款");*/
		payStatusMap.put("0", "客户已支付");
		payStatusMap.put("1", "客户未支付");
		payStatusMap.put("3", "支付失败");
		payStatusMap.put("4", "已退款");
		payStatusMap.put("5", "未退款");
		payStatusMap.put("10", "已支付");
		payStatusMap.put("11", "未支付");
		payStatusMap.put("12", "已提交支付");
		payStatusMap.put("13", "提交支付失败");
		payStatusMap.put("14", "支付失败");
		payStatusMap.put("15", "更新支付状态失败");
		payStatusMap.put("16", "响应支付平台失");
		
//		orgIdMap.put("MU", "东方航空");
//		orgIdMap.put("CZ", "南方航空");
//		orgIdMap.put("ZH", "深圳航空");
//		orgIdMap.put("PN", "西部航空");
//		orgIdMap.put("3U", "四川航空");
//		orgIdMap.put("FM", "上海航空");
//		orgIdMap.put("CA", "国际航空");
//		orgIdMap.put("HU", "海南航空");
//		orgIdMap.put("MF", "厦门航空");
//		orgIdMap.put("NS", "东北航空");
//		orgIdMap.put("2Z", "长安航空");
//		orgIdMap.put("CJ", "北部航空");
//		orgIdMap.put("3W", "南京航空");
//		orgIdMap.put("CI", "中华航空");
//		orgIdMap.put("CX", "国泰航空");
//		orgIdMap.put("WH", "西北航空");
//		orgIdMap.put("X2", "新华航空");
//		orgIdMap.put("XO", "新疆航空");
//		orgIdMap.put("Z2", "中原航空");
//		orgIdMap.put("3Q", "云南航空");
//		orgIdMap.put("SC", "山东航空");
//		orgIdMap.put("EU", "鹰联航空");
//		orgIdMap.put("8C", "东星航空");
//		orgIdMap.put("JD", "金鹿航空");
//		orgIdMap.put("HO", "吉祥航空");
//		orgIdMap.put("KN", "联合航空");
//		orgIdMap.put("OQ", "重庆航空");
//		orgIdMap.put("G5", "华夏航空");
//		orgIdMap.put("BK", "奥凯航空");
//		orgIdMap.put("VD", "鲲鹏航空");

		orgIdMap.put("CA", "中国国航");
		orgIdMap.put("SC", "山东航空");
		orgIdMap.put("CZ", "南方航空");
		orgIdMap.put("HU", "海南航空");
		orgIdMap.put("MU", "东方航空");
		orgIdMap.put("3U", "四川航空");
		orgIdMap.put("FM", "上海航空");
		orgIdMap.put("ZH", "深圳航空");
		orgIdMap.put("MF", "厦门航空");
		orgIdMap.put("KN", "中联航");
		orgIdMap.put("JD", "金鹿航空");
		
		airComMap.put("SZX", "深圳机场");
		airComMap.put("SHA", "虹桥机场");
		airComMap.put("PVG", "浦东机场");
		airComMap.put("NAY", "南苑机场");
		airComMap.put("PEK", "首都机场");
		airComMap.put("CGD", "常德机场");
		airComMap.put("JIL", "吉林机场");
		airComMap.put("HFE", "合肥机场");
		airComMap.put("DIG", "迪庆香格里拉");
		airComMap.put("ZYI", "遵义机场");
		airComMap.put("NAO", "南充");
		airComMap.put("KRY", "克拉玛依");
		airComMap.put("WUH", "武汉机场");
		airComMap.put("CZX", "常州机场");
		airComMap.put("JGN", "嘉峪关机场");
		airComMap.put("HZG", "汉中");
		airComMap.put("JNG", "济宁机场");
		airComMap.put("DAT", "大同");
		airComMap.put("YIN", "伊宁");
		airComMap.put("MFM", "澳门");
		airComMap.put("TOY", "富山");
		airComMap.put("KWE", "贵阳机场");
		airComMap.put("YUA", "元谋");
		airComMap.put("CIF", "赤峰");
		airComMap.put("INC", "银川机场");
		airComMap.put("JDZ", "景德镇机场");
		airComMap.put("HUZ", "徽州");
		airComMap.put("LNC", "临沧");
		airComMap.put("CNI", "长海");
		airComMap.put("NDG", "齐齐哈尔机场");
		airComMap.put("ZHA", "湛江机场");
		airComMap.put("YBP", "宜宾机场");
		airComMap.put("SYX", "三亚机场");
		airComMap.put("WEH", "威海机场");
		airComMap.put("SXJ", "鄯善");
		airComMap.put("WXN", "万州");
		airComMap.put("XFN", "襄樊机场");
		airComMap.put("MXZ", "梅县机场");
		airComMap.put("HTN", "和田");
		airComMap.put("CHW", "酒泉");
		airComMap.put("GNY", "广元");
		airComMap.put("CHG", "朝阳");
		airComMap.put("LUZ", "庐山");
		airComMap.put("TNN", "台南");
		airComMap.put("WHU", "芜湖");
		airComMap.put("XIL", "锡林浩特");
		airComMap.put("WEF", "潍坊");
		airComMap.put("XMN", "厦门机场");
		airComMap.put("TNS", "天水");
		airComMap.put("HKK", "海南");
		airComMap.put("DSN", "东胜");
		airComMap.put("JNZ", "锦州");
		airComMap.put("CGQ", "长春机场");
		airComMap.put("YNJ", "延吉");
		airComMap.put("JMU", "佳木斯");
		airComMap.put("XEN", "兴城");
		airComMap.put("BSD", "保山");
		airComMap.put("HMI", "哈密");
		airComMap.put("NKG", "南京机场");
		airComMap.put("JIU", "九江");
		airComMap.put("ENH", "恩施");
		airComMap.put("FUO", "佛山");
		airComMap.put("GOQ", "格尔木");
		airComMap.put("HSN", "舟山");
		airComMap.put("SWA", "汕头机场");
		airComMap.put("TCG", "塔城");
		airComMap.put("KHN", "南昌机场");
		airComMap.put("SCH", "四川");
		airComMap.put("KNC", "吉安");
		airComMap.put("IQM", "且末");
		airComMap.put("AKU", "阿克苏");
		airComMap.put("IQN", "庆阳");
		airComMap.put("ZUH", "珠海机场");
		airComMap.put("TPE", "台北");
		airComMap.put("MDG", "牡丹江机场");
		airComMap.put("KCA", "库车");
		airComMap.put("AKA", "安康");
		airComMap.put("HLD", "海拉尔");
		airComMap.put("XIC", "西昌机场");
		airComMap.put("SYM", "思茅");
		airComMap.put("FYN", "富蕴");
		airComMap.put("NNY", "南阳机场");
		airComMap.put("XNN", "西宁机场");
		airComMap.put("LZO", "泸州机场");
		airComMap.put("UYN", "榆林");
		airComMap.put("LYG", "连云港机场");
		airComMap.put("WUS", "武夷山机场");
		airComMap.put("YIH", "宜昌机场");
		airComMap.put("LXI", "林西");
		airComMap.put("LYI", "临沂");
		airComMap.put("BFU", "蚌埠");
		airComMap.put("XNT", "邢台");
		airComMap.put("YIW", "义乌");
		airComMap.put("TNA", "济南机场");
		airComMap.put("BHY", "北海机场");
		airComMap.put("TON", "铜仁");
		airComMap.put("ENY", "延安");
		airComMap.put("KHH", "高雄");
		airComMap.put("DAX", "达县");
		airComMap.put("KWL", "桂林两江机场");
		airComMap.put("FOG", "阜阳");
		airComMap.put("LJG", "丽江机场");
		airComMap.put("WUZ", "梧州");
		airComMap.put("AQG", "安庆");
		airComMap.put("JZH", "九寨沟");
		airComMap.put("JUZ", "衢州");
		airComMap.put("LHW", "兰州机场");
		airComMap.put("LXA", "拉萨");
		airComMap.put("HKG", "香港");
		airComMap.put("DLU", "大理");
		airComMap.put("LZD", "兰州东");
		airComMap.put("NGB", "宁波机场");
		airComMap.put("SZV", "苏州");
		airComMap.put("HYN", "黄岩");
		airComMap.put("MIG", "绵阳机场");
		airComMap.put("SHS", "沙市机场");
		airComMap.put("DDG", "丹东");
		airComMap.put("YLN", "铱兰");
		airComMap.put("YNZ", "盐城");
		airComMap.put("CGO", "郑州");
		airComMap.put("CKG", "重庆");
		airComMap.put("HAK", "海口机场");
		airComMap.put("YNT", "烟台机场");
		airComMap.put("HRB", "哈尔滨机场");
		airComMap.put("URC", "乌鲁木齐机场");
		airComMap.put("XUZ", "徐州机场");
		airComMap.put("HEK", "黑河");
		airComMap.put("YON", "永州");
		airComMap.put("SJW", "石家庄机场");
		airComMap.put("DYG", "张家界机场");
		airComMap.put("LYA", "洛阳机场");
		airComMap.put("TXN", "黄山机场");
		airComMap.put("XIN", "兴宁");
		airComMap.put("GHN", "广汉");
		airComMap.put("AOG", "鞍山");
		airComMap.put("ZHD", "中甸");
		airComMap.put("BAV", "包头机场");
		airComMap.put("HGH", "杭州机场");
		airComMap.put("LHN", "梨山");
		airComMap.put("CCC", "潮州");
		airComMap.put("DZU", "大足");
		airComMap.put("DLC", "大连机场");
		airComMap.put("CJU", "济州");
		airComMap.put("CAN", "白云机场");
		airComMap.put("HHA", "长沙/黄花");
		airComMap.put("SHE", "沈阳机场");
		airComMap.put("CIH", "长治");
		airComMap.put("AAT", "阿勒泰");
		airComMap.put("KHG", "喀什");
		airComMap.put("TXG", "台中");
		airComMap.put("HNY", "衡阳");
		airComMap.put("NTG", "南通机场");
		airComMap.put("LZH", "柳州机场");
		airComMap.put("XIY", "咸阳机场");
		airComMap.put("DNH", "敦煌机场");
		airComMap.put("HET", "呼和浩特机场");
		airComMap.put("WUX", "无锡");
		airComMap.put("TYN", "太原机场");
		airComMap.put("CAL", "长安");
		airComMap.put("FOC", "福州机场");
		airComMap.put("KOW", "赣州");
		airComMap.put("AYN", "安阳");
		airComMap.put("NNG", "南宁机场");
		airComMap.put("LIA", "梁平");
		airComMap.put("CTU", "双流机场");
		airComMap.put("ZAT", "昭通");
		airComMap.put("TAO", "青岛机场");
		airComMap.put("KMG", "昆明机场");
		airComMap.put("TSN", "天津机场");
		airComMap.put("KRL", "库尔勒");
		airComMap.put("TTT", "台东");
		airComMap.put("WNZ", "温州机场");
		airComMap.put("JJN", "泉州晋江");
		airComMap.put("CSX", "长沙机场");
		airComMap.put("SHP", "秦皇岛机场");
		airComMap.put("DGY", "东营");
		
		checkinStatusMap.put("0", "可值机");
		checkinStatusMap.put("1", "不可值机");

		cityMap.put("SZX", "深圳");
		cityMap.put("SHA", "上海虹桥");
		cityMap.put("PVG", "上海浦东");
		cityMap.put("NAY", "北京南苑");
		cityMap.put("PEK", "北京首都");
		cityMap.put("CGD", "常德");
		cityMap.put("JIL", "吉林");
		cityMap.put("HFE", "合肥");
		cityMap.put("DIG", "迪庆");
		cityMap.put("ZYI", "遵义");
		cityMap.put("NAO", "南充");
		cityMap.put("KRY", "克拉玛依");
		cityMap.put("WUH", "武汉");
		cityMap.put("CZX", "常州");
		cityMap.put("JGN", "嘉峪关");
		cityMap.put("HZG", "汉中");
		cityMap.put("JNG", "济宁");
		cityMap.put("DAT", "大同");
		cityMap.put("YIN", "伊宁");
		cityMap.put("MFM", "澳门");
		cityMap.put("TOY", "富山");
		cityMap.put("KWE", "贵阳");
		cityMap.put("YUA", "元谋");
		cityMap.put("CIF", "赤峰");
		cityMap.put("INC", "银川");
		cityMap.put("JDZ", "景德镇");
		cityMap.put("HUZ", "徽州");
		cityMap.put("LNC", "临沧");
		cityMap.put("CNI", "长海");
		cityMap.put("NDG", "齐齐哈尔");
		cityMap.put("ZHA", "湛江");
		cityMap.put("YBP", "宜宾");
		cityMap.put("SYX", "三亚");
		cityMap.put("WEH", "威海");
		cityMap.put("SXJ", "鄯善");
		cityMap.put("WXN", "万州");
		cityMap.put("XFN", "襄樊");
		cityMap.put("MXZ", "梅县");
		cityMap.put("HTN", "和田");
		cityMap.put("CHW", "酒泉");
		cityMap.put("GNY", "广元");
		cityMap.put("CHG", "朝阳");
		cityMap.put("LUZ", "庐山");
		cityMap.put("TNN", "台南");
		cityMap.put("WHU", "芜湖");
		cityMap.put("XIL", "锡林浩特");
		cityMap.put("WEF", "潍坊");
		cityMap.put("XMN", "厦门");
		cityMap.put("TNS", "天水");
		cityMap.put("HKK", "海南");
		cityMap.put("DSN", "东胜");
		cityMap.put("JNZ", "锦州");
		cityMap.put("CGQ", "长春");
		cityMap.put("YNJ", "延吉");
		cityMap.put("JMU", "佳木斯");
		cityMap.put("XEN", "兴城");
		cityMap.put("BSD", "保山");
		cityMap.put("HMI", "哈密");
		cityMap.put("NKG", "南京");
		cityMap.put("JIU", "九江");
		cityMap.put("ENH", "恩施");
		cityMap.put("FUO", "佛山");
		cityMap.put("GOQ", "格尔木");
		cityMap.put("HSN", "舟山");
		cityMap.put("SWA", "汕头");
		cityMap.put("TCG", "塔城");
		cityMap.put("KHN", "南昌");
		cityMap.put("SCH", "四川");
		cityMap.put("KNC", "吉安");
		cityMap.put("IQM", "且末");
		cityMap.put("AKU", "阿克苏");
		cityMap.put("IQN", "庆阳");
		cityMap.put("ZUH", "珠海");
		cityMap.put("TPE", "台北");
		cityMap.put("MDG", "牡丹");
		cityMap.put("KCA", "库车");
		cityMap.put("AKA", "安康");
		cityMap.put("HLD", "海拉尔");
		cityMap.put("XIC", "西昌");
		cityMap.put("SYM", "思茅");
		cityMap.put("FYN", "富蕴");
		cityMap.put("NNY", "南阳");
		cityMap.put("XNN", "西宁");
		cityMap.put("LZO", "泸州");
		cityMap.put("UYN", "榆林");
		cityMap.put("LYG", "连云港");
		cityMap.put("WUS", "武夷山");
		cityMap.put("YIH", "宜昌");
		cityMap.put("LXI", "林西");
		cityMap.put("LYI", "临沂");
		cityMap.put("BFU", "蚌埠");
		cityMap.put("XNT", "邢台");
		cityMap.put("YIW", "义乌");
		cityMap.put("TNA", "济南");
		cityMap.put("BHY", "北海");
		cityMap.put("TON", "铜仁");
		cityMap.put("ENY", "延安");
		cityMap.put("KHH", "高雄");
		cityMap.put("DAX", "达县");
		cityMap.put("KWL", "桂林");
		cityMap.put("FOG", "阜阳");
		cityMap.put("LJG", "丽江");
		cityMap.put("WUZ", "梧州");
		cityMap.put("AQG", "安庆");
		cityMap.put("JZH", "九寨沟");
		cityMap.put("JUZ", "衢州");
		cityMap.put("LHW", "兰州");
		cityMap.put("LXA", "拉萨");
		cityMap.put("HKG", "香港");
		cityMap.put("DLU", "大理");
		cityMap.put("LZD", "兰州东");
		cityMap.put("NGB", "宁波");
		cityMap.put("SZV", "苏州");
		cityMap.put("HYN", "黄岩");
		cityMap.put("MIG", "绵阳");
		cityMap.put("SHS", "沙市");
		cityMap.put("DDG", "丹东");
		cityMap.put("YLN", "铱兰");
		cityMap.put("YNZ", "盐城");
		cityMap.put("CGO", "郑州");
		cityMap.put("CKG", "重庆");
		cityMap.put("HAK", "海口");
		cityMap.put("YNT", "烟台");
		cityMap.put("HRB", "哈尔滨");
		cityMap.put("URC", "乌鲁木齐");
		cityMap.put("XUZ", "徐州");
		cityMap.put("HEK", "黑河");
		cityMap.put("YON", "永州");
		cityMap.put("SJW", "石家庄");
		cityMap.put("DYG", "张家界");
		cityMap.put("LYA", "洛阳");
		cityMap.put("TXN", "黄山");
		cityMap.put("XIN", "兴宁");
		cityMap.put("GHN", "广汉");
		cityMap.put("AOG", "鞍山");
		cityMap.put("ZHD", "中甸");
		cityMap.put("BAV", "包头");
		cityMap.put("HGH", "杭州");
		cityMap.put("LHN", "梨山");
		cityMap.put("CCC", "潮州");
		cityMap.put("DZU", "大足");
		cityMap.put("DLC", "大连");
		cityMap.put("CJU", "济州");
		cityMap.put("CAN", "广州");
		cityMap.put("HHA", "长沙");
		cityMap.put("SHE", "沈阳");
		cityMap.put("CIH", "长治");
		cityMap.put("AAT", "阿勒泰");
		cityMap.put("KHG", "喀什");
		cityMap.put("TXG", "台中");
		cityMap.put("HNY", "衡阳");
		cityMap.put("NTG", "南通");
		cityMap.put("LZH", "柳州");
		cityMap.put("XIY", "西安");
		cityMap.put("DNH", "敦煌");
		cityMap.put("HET", "呼和");
		cityMap.put("WUX", "无锡");
		cityMap.put("TYN", "太原");
		cityMap.put("CAL", "长安");
		cityMap.put("FOC", "福州");
		cityMap.put("KOW", "赣州");
		cityMap.put("AYN", "安阳");
		cityMap.put("NNG", "南宁");
		cityMap.put("LIA", "梁平");
		cityMap.put("CTU", "成都");
		cityMap.put("ZAT", "昭通");
		cityMap.put("TAO", "青岛");
		cityMap.put("KMG", "昆明");
		cityMap.put("TSN", "天津");
		cityMap.put("KRL", "库尔勒");
		cityMap.put("TTT", "台东");
		cityMap.put("WNZ", "温州");
		cityMap.put("JJN", "泉州");
		cityMap.put("CSX", "长沙");
		cityMap.put("SHP", "秦皇");
		cityMap.put("DGY", "东营");
	}
    	
}
